package com.hc.server.chat.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hc.server.chat.domain.entity.GroupMember;
import com.hc.server.chat.mapper.GroupMemberMapper;
import org.springframework.stereotype.Service;

/**
 * 群成员表 服务实现类
 * Created by wdj on 2024/10/23
 */
@Service
public class GroupMemberDao extends ServiceImpl<GroupMemberMapper, GroupMember> {

    public GroupMember getMember(Long groupId, Long uid) {
        return lambdaQuery()
                .eq(GroupMember::getGroupId, groupId)
                .eq(GroupMember::getUid, uid)
                .one();
    }
}
